package top.frsf.pattern.c_behavioral.b_chainrespon.handler;

import top.frsf.pattern.c_behavioral.b_chainrespon.handler.dto.Person;
import top.frsf.pattern.c_behavioral.b_chainrespon.handler.impl.DepartmentHandler;
import top.frsf.pattern.c_behavioral.b_chainrespon.handler.impl.HRHandler;
import top.frsf.pattern.c_behavioral.b_chainrespon.handler.impl.TeamHandler;

/**
 * @author FRSF
 * @since 2024/8/20 20:32
 */
public class Main {
    public static void main(String[] args) {
        LeaveRequestHandler baseHandler = LeaveRequestHandler.addHandlers(
                new TeamHandler(),
                new DepartmentHandler(),
                new HRHandler()
        );

        Person person = new Person(161,"");
        Person person2 = new Person(6,"");
        baseHandler.processRequest(person);
        baseHandler.processRequest2(person2);
        System.out.println(person.getProcessResult());
        System.out.println(person2.getProcessResult());
    }
}
